/**
 * @file   testEncode.cpp
 * @author wolfhead <wolfhead@wolfhead-laptop>
 * @date   Fri Aug 26 10:27:24 2011
 * 
 * @brief  
 * 
 * 
 */
#include "gtest/gtest.h"
#include <acapella/string/encode.hpp>

using namespace acapella;

TEST(TestEncode, CompileTest)
{
    Encoder<charset::ascii, charset::ascii> encoder;

    (void)(encoder);
}


TEST(TestEncode, UrlencodeTest)
{
    Encoder<charset::utf8, charset::urlencode> encoder;

    std::string urlencode = encoder.Encode("     ");

    printf("%s", urlencode.c_str());
}


TEST(TestEncode, UrldecodeTest)
{
    Encoder<charset::urlencode, charset::utf8> encoder;

    //std::string urlencode = encoder.Encode("%20%20");

    std::string urlencode = encoder.Encode("%e4%bd%a0%e5%a5%bd");

    printf("%s", urlencode.c_str());
}
